<template>
  <div class="moredoctor">
    <Navtab :title="title" />
    <van-card
      v-for="item in hospitalsList"
      @click-thumb="goHospitalsDetail(item.Hid)"
      :key="item.id"
      thumb="https://kang-1305144775.cos.ap-nanjing.myqcloud.com/heade.jpg"
    >
      <template #desc>
        <div>
          <div class="box1">
            <div class="grade">{{ item.grade }}</div>
            <div class="name">{{ item.Hname }}</div>
          </div>
          <div class="distants">0.5km</div>
        </div>
        <div class="phone">{{ item.phone }}</div>
        <div class="address">{{ item.Haddress }}</div>
      </template>
    </van-card>
  </div>
</template>
<script>
import Navtab from '../../../components/Navtab'
export default {
  components: {
    Navtab
  },
  data: () => ({
    title: '',
    hospitalsList: []
  }),
  methods: {
    async gethops () {
      const res = await this.$http.getHops()
      this.hospitalsList = res.data
      console.log(this.hospitalsList)
    },
    goDoctorsDetail (id) {
      this.$router.push('/home/doctorsInfo/' + id)
    }
  },
  created () {
    this.title = this.$route.meta.title
    this.gethops()
  }
}
</script>
<style lang="scss" scoped>
</style>
